using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Services;
using JigLibX.Physics;
using Utilities;
using SpaceBattle.Logic;
using SpaceBattle.Logic.SampleLevel;


namespace SpaceBattle
{
    using Nuke = Projectile;
    using NukeData = ProjectileData;

    public abstract class AsteroidsLayer : ProjectilesLayer
    {
        public AsteroidsLayer(Microsoft.Xna.Framework.Game game)
            : base(game)
        {
        }


        protected override void DrawAsteroids(State current_state)
        {
            //for_each (var asteroid in current_state.asteroids)
            for (int i = 0; i < current_state.asteroids.Count; i++)
            {
                var asteroid = current_state.asteroids[i];
                Matrix word = Matrix.CreateScale(asteroid.size);
                Asteroid.Model.DrawAsBody(word, asteroid.geometry, view, projection);
            }
        }

    }
}
